package com.ald.crossex.entity;

import javax.persistence.*;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by lishijiong on 15/2/5.
 */
@Entity
@Table(name = "ce_order", schema = "", catalog = "")
public class TCeOrder {
    private Integer oid;
    private Integer gid;
    private Integer guid;
    private Integer duid;
    private String status;
    private Date startTime;
    private Date endTime;
    private Integer isDelete;
    private Date createTime;
    private Date updateTime;

    @Id
    @Column(name = "oid")
    @GeneratedValue(strategy=IDENTITY)
    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    @Basic
    @Column(name = "gid")
    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    @Basic
    @Column(name = "guid")
    public Integer getGuid() {
        return guid;
    }

    public void setGuid(Integer guid) {
        this.guid = guid;
    }

    @Basic
    @Column(name = "duid")
    public Integer getDuid() {
        return duid;
    }

    public void setDuid(Integer duid) {
        this.duid = duid;
    }

    @Basic
    @Column(name = "status")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "start_time")
    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "end_time")
    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    @Basic
    @Column(name = "is_delete")
    public Integer getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "update_time")
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TCeOrder tCeOrder = (TCeOrder) o;

        if (oid != tCeOrder.oid) return false;
        if (createTime != null ? !createTime.equals(tCeOrder.createTime) : tCeOrder.createTime != null) return false;
        if (duid != null ? !duid.equals(tCeOrder.duid) : tCeOrder.duid != null) return false;
        if (endTime != null ? !endTime.equals(tCeOrder.endTime) : tCeOrder.endTime != null) return false;
        if (gid != null ? !gid.equals(tCeOrder.gid) : tCeOrder.gid != null) return false;
        if (guid != null ? !guid.equals(tCeOrder.guid) : tCeOrder.guid != null) return false;
        if (isDelete != null ? !isDelete.equals(tCeOrder.isDelete) : tCeOrder.isDelete != null) return false;
        if (startTime != null ? !startTime.equals(tCeOrder.startTime) : tCeOrder.startTime != null) return false;
        if (status != null ? !status.equals(tCeOrder.status) : tCeOrder.status != null) return false;
        if (updateTime != null ? !updateTime.equals(tCeOrder.updateTime) : tCeOrder.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = oid;
        result = 31 * result + (gid != null ? gid.hashCode() : 0);
        result = 31 * result + (guid != null ? guid.hashCode() : 0);
        result = 31 * result + (duid != null ? duid.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (startTime != null ? startTime.hashCode() : 0);
        result = 31 * result + (endTime != null ? endTime.hashCode() : 0);
        result = 31 * result + (isDelete != null ? isDelete.hashCode() : 0);
        result = 31 * result + (createTime != null ? createTime.hashCode() : 0);
        result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0);
        return result;
    }
}
